<template>
  <div id="top">
    <!-- 上部分 -->
    <!-- 中间部分 -->
    <div class="body container">
      <welcome></welcome>
    </div>
    <footer class="footer hidden-xs">
      <div class="container-fluid" id="footer">
        <p class="address">
          Copyright&nbsp;©&nbsp;2017-2020 All Rights Reserved 优优班--学霸训练营
          Copyrights
          <a @click="getinfo">粤ICP备20053482号-2</a>
        </p>
      </div>
    </footer>
  </div>
  <!-- 固定定位内容 -->
  <div class="main_nav_bottom hidden-md hidden-sm hidden-lg">
    <nav class="navbar navbar-default navbar-fixed-bottom">
      <div class="container" align="center">
        <ul class="nav nav-tabs nav-tabs-justified">
          <div class="row" align="center">
            <div class="col-md-3 col-sm-2 col-xs-2" style="padding: 0" align="center">
              <li>
                <a href="https://www.uuban.com"
                  ><img src="../assets/images/i_home.png" />首页</a
                >
              </li>
            </div>
            <div class="col-md-3 col-sm-2 col-xs-2" align="center">
              <li>
                <a href="https://www.uuban.com/index.php/index/index/chques.html"
                  ><img src="../assets/images/i_zujuan.png" />组卷</a
                >
              </li>
            </div>
            <div class="col-md-3 col-sm-3 col-xs-3" align="center">
              <li>
                <a href="https://www.uuban.com/index.php/index/index/zujuan.html"
                  ><img src="../assets/images/i_cart.png" />试题篮</a
                >
              </li>
            </div>
            <div class="col-md-3 col-sm-2 col-xs-2" align="center">
              <li>
                <a href="https://www.uuban.com/paperfile.html"
                  ><img src="../assets/images/i_paperfile.png" />试卷</a
                >
              </li>
            </div>
            <div class="col-md-3 col-sm-2 col-xs-2" align="center">
              <li>
                <a href="/u/20278"><img src="../assets/images/i_my.png" />我的</a>
              </li>
            </div>
          </div>
        </ul>
      </div>
    </nav>
  </div>
</template>

<script setup>
import { GetUserInfo } from "../../api/index";
import welcome from "../components/Welcome.vue";
function getinfo() {
  $cookies.set("PHPSESSID", "f40c94219fd9fa6867020f081ef8039f");
  $cookies.set("think_var", "zh-cn");
  GetUserInfo().then((res) => {
    console.log(res.user);
    var list=res.user
    console.log(list)
    localStorage.setItem("info",JSON.stringify(list))
  });
}
</script>

<style scoped>
@import url(../assets/css/index.css);
/* 当屏幕小于110px的时候 */
@media screen and (max-width: 1100px) {
  .header {
    display: none;
  }
  .body {
    padding-top: 2rem;
  }
  div.smallnav {
    display: flex;
  }
  div.tan,
  div.tan1 {
    display: block;
  }
  .zhankai {
    display: none;
  }
}
.smallnav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3rem;
  background-color: #fff;
  display: none;
  z-index: 11;
}
.smallnav p {
  flex: 3;
  width: 1rem;
  height: 3rem;
  /* background-color: green; */
}
.smallnav p:nth-child(1) {
  flex: 2;
  background: url(../assets/images/logo.png);
  background-size: 70% 70%;
  background-position: center center;
  background-repeat: no-repeat;
}
.smallnav p:nth-child(2) {
  flex: 5;
  background: url(../assets/images/logoname.png);
  background-size: 70% 70%;
  background-position: 20% center;
  background-repeat: no-repeat;
}
.smallnav p:nth-child(3) {
  flex: 1;
}
.smallnav p:nth-child(3)::after {
  content: "";
  position: fixed;
  top: 0.5rem;
  right: 2rem;
  width: 2rem;
  height: 2rem;
  background: url(../assets/images/icon/menu1.png);
  background-size: contain;
  z-index: 12;
}
.tan {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  position: fixed;
  top: 3rem;
  z-index: 10;
  display: none;
}
.tan1 {
  width: 30%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  position: fixed;
  right: 0%;
  top: 3rem;
  z-index: 10;
  transition: 1s;
  display: none;
}
.v-enter-active {
  animation: move 1s;
}

/* 离开：始位置 */
.v-leave-active {
  animation: outout 1s;
}

.tan1 ul {
  margin-top: 8%;
}
.tan1 ul li {
  cursor: pointer;
  color: #9d9d9d;
  text-align: left;
  padding: 5% 0 5% 8%;
}
.tan1 ul li:hover {
  color: #fff;
}

@keyframes move {
  0% {
    right: -30%;
  }
  100% {
    right: 0;
  }
}
@keyframes outout {
  0% {
    right: 0%;
  }
  100% {
    right: -30%;
  }
}
</style>
